
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<base href="<%=basePath%>" />
<%@ taglib prefix="s" uri="/struts-tags"%>
<title>Papers</title>
<table>
	<tr>
		<td width="100" align="center"><img src="img/paper.png"
			width="40" height="40" /></td>

		<td width="100" align="center"><img src="img/english.png"
			width="40" height="40" /></td>

		<td width="100" align="center"><img src="img/opinion.png"
			width="40" height="40" /></td>
		<td><font style="font-size: 30"><strong>My Paper
					Library</strong></font> &nbsp;&nbsp;&nbsp;paperCount:<s:property value="paperCount" />
			&nbsp;&nbsp;&nbsp;sentenceCount:<s:property value="sentenceCount" />
			&nbsp;&nbsp;&nbsp;opinionCount:<s:property value="opinionCount" /></td>
	</tr>
	<tr>
		<td width="100" align="center"><a href="listPaper.do"><font
				style="font-size: 13">[papers]</font></a></td>
		<td width="100" align="center"><a href="listSentence.do"><font
				style="font-size: 13">[sentences]</font></a></td>
		<td width="100" align="center"><a href="listOpinion.do"><font
				style="font-size: 13">[opinions]</font></a></td>
		<td></td>
	</tr>
</table>
<hr size=0 noshade color="#eeeeee">

<table>
	<tr>
		<td width="300"><font style="font-size: 12; font-family: verdana">Input
				a new Paper:</font><br>
			<form action="insertPaper.do">
				<table>
					<tr>
						<td>Domain</td>
						<td><select name="type">

								<s:iterator value="paperTypes">
									<option value="${id}">
										<s:property value="name" />
									</option>
								</s:iterator>
						</select><a href="listPaperType.do">[add]</a></td>
					</tr>
					<tr>
						<td>title</td>
						<td width="200"><input name="title" size="30"></td>
					</tr>
					<tr>
						<td>author</td>
						<td><input name="author" size="30"></td>
					</tr>
					<tr>
						<td>source</td>
						<td><input name="source" size="30"></td>
					</tr>
					<tr>
						<td>year</td>
						<td><select name="year">
								<option value="2012">2012</option>
								<option value="2011">2011</option>
								<option value="2010">2010</option>
								<option value="2009">2009</option>
								<option value="2008">2008</option>
								<option value="2007">2007</option>
								<option value="2006">2006</option>
								<option value="2005">2005</option>
								<option value="2004">2004</option>
								<option value="2003">2003</option>
								<option value="2002">2002</option>
								<option value="2001">2001</option>
								<option value="2000">2000</option>
						</select></td>
					</tr>
					<tr>
						<td>affiliation</td>
						<td><input name="affiliation" size="30"></td>
					</tr>
					<tr>
						<td>vol</td>
						<td><input name="vol" size="5"></td>
					</tr>
					<tr>
						<td>no</td>
						<td><input name="no" size="5"></td>
					</tr>
					<tr>
						<td>url</td>
						<td><input name="url" size="30"></td>
					</tr>
					<tr>
						<td></td>
						<td><input type="submit" value="save"></td>
					</tr>
				</table>
			</form> <br> <font style="font-size: 12; font-family: verdana">Note:
				You can put paper information into <br>your paper lab by fill
				in the above form.
		</font></td>
		<td width="1000">
			<form action="searchPaper.do" method="post">
				<input name="keyword" size="30">&nbsp;<input type="submit"
					value="search">
			</form> <font style="font-family: verdana; font-size: 12">Total
				Count:<font style="color: red"><s:property value="totalCount" /></font>
		</font> <br />
			<hr size=0 noshade color="#eeeeee"> <s:if test="papers.size > 0">
				<s:iterator value="papers">
					<strong><font style="color: orange">[<s:property
								value="paperType.name" />]
					</font> <a href="${url}"> <s:property value="title" />
					</a> </strong>
					<br />
					<font style="font-size: 12; font-family: verdana"><s:property
							value="author" /></font>
									&nbsp;&nbsp;&nbsp; <font
						style="color: red; font-size: 12; font-family: verdana"><s:property
							value="affiliation" /></font>-<font
						style="color: blue; font-size: 12; font-family: verdana"><s:property
							value="year" /></font>
					<br>
					<font style="font-size: 12; font-family: verdana">source: <font
						style="color: green"><s:property value="source" /></font></font> &nbsp;&nbsp;&nbsp;
									<s:if test="no>0">
						no:
						<s:property value="no" />
					</s:if>
									&nbsp;&nbsp;&nbsp;
									<s:if test="vol>0">
						vol:
						<s:property value="vol" />
					</s:if>
					sentences<a href="paperSentence.do?paperId=${Id}"> <font
						style="font-size: 12; font-family: verdana">[<s:property
								value="sentenceCount" />]
					</font></a>
					opinions<a href="paperOpinion.do?paperId=${Id}"> <font
						style="font-size: 12; font-family: verdana">[<s:property
								value="opinionCount" />]
					</font></a>
					<br />
				</s:iterator>
			</s:if> <br> <font style="font-size: 12; font-family: verdana">
				<s:if test="curPage!=1">
					<a href="listPaper.do?curPage=1&pageSize=${pageSize}">home</a>
				</s:if> <s:if test="curPage-3>0&&curPage<=totalPage">
					<a href="listPaper.do?curPage=${curPage-3}&pageSize=${pageSize}"><s:property
							value="curPage-3" /></a>
				</s:if> <s:if test="curPage-2>0&&curPage<=totalPage">
					<a href="listPaper.do?curPage=${curPage-2}&pageSize=${pageSize}"><s:property
							value="curPage-2" /></a>
				</s:if> <s:if test="curPage-1>0&&curPage<=totalPage">
					<a href="listPaper.do?curPage=${curPage-1}&pageSize=${pageSize}"><s:property
							value="curPage-1" /></a>
				</s:if> <s:property value="curPage" /> <s:if
					test="curPage+1>0&&curPage+1<=totalPage">
					<a href="listPaper.do?curPage=${curPage+1}&pageSize=${pageSize}"><s:property
							value="curPage+1" /></a>
				</s:if> <s:if test="curPage+2>0&&curPage+2<=totalPage">
					<a href="listPaper.do?curPage=${curPage+2}&pageSize=${pageSize}"><s:property
							value="curPage+2" /></a>
				</s:if> <s:if test="curPage+3>0&&curPage+3<=totalPage">
					<a href="listPaper.do?curPage=${curPage+3}&pageSize=${pageSize}"><s:property
							value="curPage+3" /></a>
				</s:if> <a href="listPaper.do?curPage=${totalPage}&pageSize=${pageSize}">end</a>
				&nbsp;&nbsp;&nbsp;&nbsp;Total Pages: <s:property value="totalPage" />
		</font>
		</td>
	</tr>
</table>





